var table;
var $;
var layer;
layui.use(['table', 'jquery', 'layer'], function () {
    table = layui.table;
    $ = layui.jquery;
    layer = layui.layer;

    table.render({
        elem: "#root",
        url: "/json/Journal.json",
        toolbar: '#toptool',
        defaultToolbar: ['print', 'filter', 'exports'],
        totalRow: true,
        size: "sm",
        page: true,
        limit: 10,
        limits: [10, 20, 30],
        cols: [[
            {checkbox: true, fixed: true},
            {field: 'id', title: '序号', align: 'center'},
            {field: 'bianhao', title: '商品编号', align: 'center'},
            {field: 'name', title: '商品名称', align: 'center'},
            {field: 'yuan', title: '原价', align: 'center'},
            {field: 'xian', title: '现价', align: 'center'},
            {field: 'cao', title: '操作时间', align: 'center'},
        ]]
    });
});
